Skip to content

Fix inverted rmdir() result in the POSIX and stdio adapters - #12

Merged
attermann merged 1 commit into
attermann:masterfrom
zerokelvin-dev:rmdir-result
Nov 10, 2026
Merged

attermann merged 1 commit into
attermann:masterfrom
zerokelvin-dev:rmdir-result

Conversation

@jamiecounsell

Copy link
Copy Markdown

rmdir() in the POSIX and stdio adapters returned false when the directory was removed and true when it wasn't, the opposite of every other adapter (and of mkdir()).

Adds test/test_posix_fs, which runs the adapters against a real temp directory. The new tests fail on master and pass here.

Testing: pio test -e native. The new tests pass. test_file_store_compact_basic, test_dir_prefix_reload_index and test_dir_prefix_compact already fail on master and are unchanged.

rmdir() in the POSIX and stdio adapters returned false when the directory
was removed and true when it wasn't, the opposite of every other adapter
(and of mkdir()).

Adds test/test_posix_fs, which runs the adapters against a real temp
directory.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019rUgoKJdB4U8fNS9HybY8S
@attermann

Copy link
Copy Markdown
Owner

Thanks for catching this, and for adding a test that shows the bug on master. The fix makes the POSIX and stdio adapters match the others. I'll give it a final look when I get a chance. Since the return value changes, I'll add a note to the CHANGELOG for anyone downstream who worked around the old behavior.

@attermann
attermann merged commit 1107c34 into attermann:master Nov 10, 2026
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants